
import { baseFlatten } from '../../.internal/lodash/baseFlatten.js';

const INFINITY = 1 / 0;

/**
 * 
 * @desc 将array递归为一维数组
 * @param {Array} array 
 * @return {Array} array
 */
function arrayFlattenDeep(array) {
	const length = array == null ? 0 : array.length;
	return length ? baseFlatten(array, INFINITY) : [];
}

export { arrayFlattenDeep };